package com.mall.service.ps;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mall.client.ps.PsVideoService;
import com.mall.custom.dao.read.PsVideoReadMapper;
import com.mall.custom.dao.write.PsVideoWriteMapper;
import com.mall.pojo.PsVideo;
import com.mall.pojo.PsVideoExample;
@Service
public class PsVideoServiceImpl implements PsVideoService {
	@Autowired
	private PsVideoReadMapper psVideoReadMapper;
	
	@Autowired
	private PsVideoWriteMapper  psVideoWriteMapper;

	@Override
	public List<PsVideo> getPsVideoListByExample(PsVideoExample example) {
		return this.psVideoReadMapper.selectByExample(example);
	}

	@Override
	public Integer getCountByExample(PsVideoExample example) {
		return this.psVideoReadMapper.countByExample(example);
	}

	@Override
	public PsVideo getPsVideoById(Long psVideoId) {
		return this.psVideoReadMapper.selectByPrimaryKey(psVideoId);
	}

	@Override
	public void updateUrLByName(PsVideo psVideo) {
		psVideoWriteMapper.updateByPrimaryKey(psVideo);
		
	}

	@Override
	public int getVideoCategoryCountByPsVideoExample(PsVideoExample example) {
		return this.psVideoReadMapper.videoCategoryCountByPsVideoExample(example);
	}

	@Override
	public List<PsVideo> getCategoryListByPsVideoExample(PsVideoExample psVideoExample) {
		return this.psVideoReadMapper.videoCategoryListByPsVideoExample(psVideoExample);
	}

}
